<?php
namespace App\Module\Pay\Request;

use Hyperf\Validation\Request\FormRequest;
use Hyperf\Validation\Rule;

class ActivityRequest extends FormRequest{

    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'share_id'=>['sometimes',Rule::exists("user","user_id")],
            'act_id'=>['required',Rule::exists("activity","act_id")],
            'score'=>'required|integer',
            'child_name'=>'required',
            'parent_name'=>'required',
            'parent_mobile'=>'required|size:11'
        ];
    }
}